# -*- coding:utf-8 -*-
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# error code
ACL_SUCCESS = 0

# rule for mem
ACL_MEM_MALLOC_HUGE_FIRST = 0
ACL_MEM_MALLOC_HUGE_ONLY = 1
ACL_MEM_MALLOC_NORMAL_ONLY = 2

# rule for memory copy
ACL_MEMCPY_HOST_TO_HOST = 0
ACL_MEMCPY_HOST_TO_DEVICE = 1
ACL_MEMCPY_DEVICE_TO_HOST = 2
ACL_MEMCPY_DEVICE_TO_DEVICE = 3

NPY_BOOL = 0
NPY_BYTE = 1
NPY_UBYTE = 2
NPY_SHORT = 3
NPY_USHORT = 4
NPY_INT = 5
NPY_UINT = 6
NPY_LONG = 7
NPY_ULONG = 8
NPY_FLOAT32 = 11

# video encoding protocol
H265_MAIN_LEVEL = 0
H264_BASELINE_LEVEL = 1
H264_MAIN_LEVEL = 2
H264_HIGH_LEVEL = 3

# acl data format
ACL_FORMAT_UNDEFINED = -1
ACL_FORMAT_NCHW = 0
ACL_FORMAT_NHWC = 1
ACL_FORMAT_ND = 2
ACL_FORMAT_NC1HWC0 = 3
ACL_FORMAT_FRACTAL_Z = 4

# pixel Format
PIXEL_FORMAT_YUV_400 = 0  # 0, YUV400 8bit
PIXEL_FORMAT_YUV_SEMIPLANAR_420 = 1  # 1, YUV420SP NV12 8bit
PIXEL_FORMAT_YVU_SEMIPLANAR_420 = 2  # 2, YUV420SP NV21 8bit
PIXEL_FORMAT_YUV_SEMIPLANAR_422 = 3  # 3, YUV422SP NV12 8bit
PIXEL_FORMAT_YVU_SEMIPLANAR_422 = 4  # 4, YUV422SP NV21 8bit
PIXEL_FORMAT_YUV_SEMIPLANAR_444 = 5  # 5, YUV444SP NV12 8bit
PIXEL_FORMAT_YVU_SEMIPLANAR_444 = 6  # 6, YUV444SP NV21 8bit
PIXEL_FORMAT_YUYV_PACKED_422 = 7  # 7, YUV422P YUYV 8bit
PIXEL_FORMAT_UYVY_PACKED_422 = 8  # 8, YUV422P UYVY 8bit
PIXEL_FORMAT_YVYU_PACKED_422 = 9  # 9, YUV422P YVYU 8bit
PIXEL_FORMAT_VYUY_PACKED_422 = 10  # 10, YUV422P VYUY 8bit
PIXEL_FORMAT_YUV_PACKED_444 = 11  # 11, YUV444P 8bit
PIXEL_FORMAT_RGB_888 = 12  # 12, RGB888
PIXEL_FORMAT_BGR_888 = 13  # 13, BGR888
PIXEL_FORMAT_ARGB_8888 = 14  # 14, ARGB8888
PIXEL_FORMAT_ABGR_8888 = 15  # 15, ABGR8888
PIXEL_FORMAT_RGBA_8888 = 16  # 16, RGBA8888
PIXEL_FORMAT_BGRA_8888 = 17  # 17, BGRA8888
PIXEL_FORMAT_YUV_SEMI_PLANNER_420_10BIT = 18  # 18, YUV420SP 10bit
PIXEL_FORMAT_YVU_SEMI_PLANNER_420_10BIT = 19  # 19, YVU420sp 10bit
PIXEL_FORMAT_YVU_PLANAR_420 = 20  # 20, YUV420P 8bit
PIXEL_FORMAT_YVU_PLANAR_422 = 21
PIXEL_FORMAT_YVU_PLANAR_444 = 22
PIXEL_FORMAT_RGB_444 = 23
PIXEL_FORMAT_BGR_444 = 24
PIXEL_FORMAT_ARGB_4444 = 25
PIXEL_FORMAT_ABGR_4444 = 26
PIXEL_FORMAT_RGBA_4444 = 27
PIXEL_FORMAT_BGRA_4444 = 28
PIXEL_FORMAT_RGB_555 = 29
PIXEL_FORMAT_BGR_555 = 30
PIXEL_FORMAT_RGB_565 = 31
PIXEL_FORMAT_BGR_565 = 32
PIXEL_FORMAT_ARGB_1555 = 33
PIXEL_FORMAT_ABGR_1555 = 34
PIXEL_FORMAT_RGBA_1555 = 35
PIXEL_FORMAT_BGRA_1555 = 36
PIXEL_FORMAT_ARGB_8565 = 37
PIXEL_FORMAT_ABGR_8565 = 38
PIXEL_FORMAT_RGBA_8565 = 39
PIXEL_FORMAT_BGRA_8565 = 40
PIXEL_FORMAT_RGB_BAYER_8BPP = 50
PIXEL_FORMAT_RGB_BAYER_10BPP = 51
PIXEL_FORMAT_RGB_BAYER_12BPP = 52
PIXEL_FORMAT_RGB_BAYER_14BPP = 53
PIXEL_FORMAT_RGB_BAYER_16BPP = 54
PIXEL_FORMAT_BGR_888_PLANAR = 70
PIXEL_FORMAT_HSV_888_PACKAGE = 71
PIXEL_FORMAT_HSV_888_PLANAR = 72
PIXEL_FORMAT_LAB_888_PACKAGE = 73
PIXEL_FORMAT_LAB_888_PLANAR = 74
PIXEL_FORMAT_S8C1 = 75
PIXEL_FORMAT_S8C2_PACKAGE = 76
PIXEL_FORMAT_S8C2_PLANAR = 77
PIXEL_FORMAT_S16C1 = 78
PIXEL_FORMAT_U8C1 = 79
PIXEL_FORMAT_U16C1 = 80
PIXEL_FORMAT_S32C1 = 81
PIXEL_FORMAT_U32C1 = 82
PIXEL_FORMAT_U64C1 = 83
PIXEL_FORMAT_S64C1 = 84
PIXEL_FORMAT_BUTT = 1003
PIXEL_FORMAT_UNKNOWN = 10000
